<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateComplaintRecordLogTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('complaint_record_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->default(0)->comment('管理人员');
            $table->integer('to_user_id')->default(0)->comment('投诉对象');
            $table->text('label')->comment('投诉标签');
            $table->text('content')->comment('投诉内容');
            $table->text('images')->comment('投诉图片');
            $table->tinyInteger('level')->default(0)->comment('投诉等级');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('complaint_record_log');
    }
}
